package com.jcl.cloud.services.crawler.brain.task;


import com.jcl.cloud.common.service.exception.JclCrawlException;
import com.jcl.cloud.services.brain.common.dto.CrawlDispatchTask;
import com.jcl.cloud.services.crawler.brain.service.BaseGrabWorkerService;
import org.springframework.stereotype.Service;


@Service
public class GrabCrawlerWorkerHandler extends BaseGrabWorkerService implements WorkerHandler {


    @Override
    public void execute(Object object) throws JclCrawlException {
        CrawlDispatchTask crawlDispatchTask = new CrawlDispatchTask();

            this.beforeWorker(crawlDispatchTask,object);
            this.doWorker(crawlDispatchTask,object);
            this.afterWorker(crawlDispatchTask,object);

    }



    @Override
    public void handlerException(Object object, String failReason) {

    }




    @Override
    protected void afterWorker(CrawlDispatchTask crawlDispatchTask, Object object) {

    }
}
